package homework.mid_autumn_festival.io_exercise;

import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class FlushDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fis = new FileOutputStream("./ttt.txt");
        BufferedOutputStream bos = new BufferedOutputStream(fis);
        String str = "半满斑马你不要睡啦 让我看看你的受伤的尾巴";
        byte[] data = str.getBytes(StandardCharsets.UTF_8);
        bos.write(data);
        bos.close();
        System.out.println("写出完毕");



    }
}
